DESCRIPTION
This *.zip file contains the code used in estimating the site choice models described in 

Reeling, C., V. Verdier, and F. Lupi. "Valuing Goods Allocated via Dynamic Lottery." Journal of the Association of Environmental and Resource Economists.

Note that this file does not contain all the data used to estimate the model. Individual-level data used in the first-stage estimates (described below) is owned by the Michigan Department of Natural Resources (DNR), who granted us access for the purposes of this research. These data were covered by a nondisclosure agreement and cannot be posted publicly. Contact the Michigan DNR Wildlife Division at DNR-Wildlife@michigan.gov to enquire about accessing the data.

The estimation routine was primiarly written in MATLAB. The alternative static model results presented in the last two columns of Table 4 were estimated in Stata. The code for all results is divided into separate files. Each heading (in caps below) describes the code in each file.


\MAIN
This folder is divided into two subdirectories containing code for deriving the first- and second-stage parameter estimates of the main dynamic model (Tables 4 and 6).

\First Stage: This code produced the first-stage estimation results (first two columns of Table 4 in the article) via maximum likelihood (ML). The file dreumScript.m is a script that loads and processes all data then initializes the ML routine. This script calls on a number of other function files to calculate the log likelihood and gradient used in estimation. The code is heavily commented; see the comments for details about the relationship between function files. Input files include the probability of winning a permit at each hunt for each preference point stock (phi.csv) and two *.csv files containing individual-level choice data for 2008 (data_08.csv) and 2009 (data_09.csv). The data_*.csv files here are blank except for the column headings to prevent disclosing proprietary data. A key for the column headings is below:

1. id - an individual-specific identifier (ids must match for each individual in both data_08.csv and data_09.csv)
2. hunt - the individual's hunt choice (0 = preference-point only option; 1-22 = hunts 1-22; 23 = opt out)
3. pp - current preference point stock (0 - 9)
4 - 25. mc_* - the round-trip travel cost of mileage to each site (equal to [miles driven]*[cost/mile])
26 - end. oc_* the tround-trip opportunity cost of time for travel to each site (equal to [travel time]*[annual income]/2000*[1/3]).

\Second Stage: This code produced the second-stage estimation results (Table 6) via OLS in Stata. This code relies only on the first-stage estimates and publicly-available data and hence can be used as-is to completely replicate the results in Table 6.


\SITE CLOSURE
This folder contains code used to generate the willingness to pay (WTP) measures for the Newberry site presented in Figure 3 in the manuscript. The folder has three subdirectories:

\Full Model: This folder has two subdirectories. The folder \Figure 3 contains code that calculates WTP for Newberry and non-Newberry applicants via simulation for the full dynamic model. (These are the numbers shown in the first column of Figure 3). The *.m file is a script that performs the simulation using sigma1save.mat as an input. The script file is heavily commented. The folder \Figure 4 calculates WTP for Newberry under the full model via the contraction mapping described in Appendix B. The file dreumWTPScript.m is a script file that runs the contraction mapping. It relies on a number of function files and first-round estimation results (included in the \Results subdirectory) to calculate the new Nash equilibrium application patterns following site closure. The dreumWTPScript.m file is heavily commented; see the comments for details about the relationship between function files. The file UH_HE_Distribution_Changes.m is used to calculate the change in equilibrium distributions pictured in Figure 4 of the manuscript. There is also code at the end of this file that generates the permit values used to estimate marginal WTP for site attributes in the Buschena comparison. (See the section titled "\BUSCHENA" below.)

\No ES: This folder contains code that calculates WTP for Newberry and non-Newberry applicants via simulation for the model without equilibrium sorting. (These are the numbers shown in the second column of Figure 3). The *.m file is a script that performs the simulation using the *.mat file as an input. The script file is heavily commented.

\Myopic: This folder contains code that calculates WTP for Newberry and non-Newberry applicants via simulation for the model without forward-looking behavior. (These are the numbers shown in the final column of Figure 3). The *.m file is a script that performs the simulation using the *.mat files as inputs. The script file is heavily commented.

Note that the code here relies only on first-stage model estimates and not any individual-specific data.  


\AKABUA
This folder contains code for estimating a static version of the model following Akabua et al. (1999) in Stata. These results are presented in the last two columns of Table 4. This code draws on the same proprietary individual-level dataset referred to above, so no data is included here. The data file for this code comprises a (N*J x 7)-element dataset, where N is the number of individuals and J is the number of choice alternatives (here, 24). Columns are

1. id - Individual-specific ID
2. pp - Preference point stock in year t
3. site - site number (0 = preference-point only option; 1-22 = hunts 1-22; 23 = opt out)
4. choice - =1 if the individual chose site j in year t or =0 otherwise
5. tc - round-trip travel costs for each site 
6. phi - the success probability for each site
7. year - the year of the drawing (2008  or 2009)


\BUSCHENA
This folder contains estimates of the marginal willingness to pay for site attributes following Buschena et al. (2001; see Table 7 in the manuscript text). The file "Buschena MWTP Calculation.xlsx" is an Excel workbook. The first worksheet ("Buschena mWTP") contains the calculations of the amortized cost of a permit following Buschena et al. (2001). The second worksheet ("Buschena reg") regresses these costs on site attributes. The regression results reproduce the figures shown in the last column of Table 7. The remaining files calculate the marginal willingness to pay using estimates of permit value derived from the full dynamic model. Permit values were calculated using code in the UH_HE_Distribution_Changes.m file (see the section titled "\SITE CLOSURE" above). The file Static_Script_DREUM.do is a script that regresses these values on site characteristics. The file can be run as-is and will reproduce the results in the first column of Table 7.









